fix(proofs): repair bit-rotted WokeLang.v (Coq) + meticulous audit + CI gate#82
Merged
Merged
Conversation
The Coq formalization `docs/proofs/verification/WokeLang.v` claimed type safety
but did NOT compile under Coq 8.18 — the same "verified but unchecked" hazard
the Lean file had, because no CI ever ran the prover.
Rot fix:
- `value_eq_dec` used `decide equality; ... apply list_eq_dec; assumption`, but
the recursive IH for the nested `list value` is no longer in scope under 8.18
("No such assumption"). Fixed with an explicit fixpoint
(`fix IH 1; ...; apply list_eq_dec; exact IH`). This was the ONLY rot; the
rest of the file (incl. the large preservation proof) then compiled.
Meticulous soundness check (Print Assumptions): NO Admitted/admit/Axiom; the
headline theorems (progress, preservation, type_safety) depend only on
`ClassicalDedekindReals.sig_forall_dec` + `functional_extensionality`, both
pulled in unavoidably by modelling floats as `R` — exactly as the header claims.
Also fixed a real latent bug + added the missing gate:
- `cap_subsumes` catch-all was `TODO: false`, so subsumption was not even
reflexive. Fixed to fall back to decidable equality (`capability_eq_dec`,
kept Opaque) and proved `cap_subsumes_refl` (axiom-free). `cap_subsumes_trans`
documented as a follow-up (needs explicit per-kind analysis).
- `.github/workflows/coq-proofs.yml` — installs Coq 8.18 (pinned ubuntu-24.04)
and runs `coqc WokeLang.v` on every push, so it cannot silently rot again.
- AUDIT.md gains a full Coq section (rot, axioms, coverage vs Lean — Coq is
AHEAD on arrays/well-founded progress, BEHIND on binops — and the
brute-force-preservation quality follow-up). .gitignore for Coq artifacts.
https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7
hyperpolymath
marked this pull request as ready for review
June 14, 2026 14:31
hyperpolymath
added a commit
that referenced
this pull request
Jun 15, 2026
…ation state (#83) ## Why The Lean + Coq proof repair/extension landed in **#79–#82 (all merged)** but was **invisible to the estate's bot-coordination layer**. The machine-readable state still described a pre-proof-work world: - `STATE.a2ml [frontier]` named only an aspirational Isabelle narrative and **omitted the existing, now-verified Lean+Coq type-safety track** entirely; `last-shepherd` stopped at #77. - `debt.a2ml` carried **zero** real items — so the documented proof follow-ups would not reach the next session's Phase 0. - `coverage.a2ml` had no record that `docs/proofs/verification/` was visited. - `methodology.a2ml`'s divergent-mode invariants were generic template stubs — one example literally read *"Idris2 only … no Lean4, Coq"*, the **opposite** of reality, a real footgun for a divergent-mode bot. ## What (all additive; no curated content overwritten) Surfaced through the channels whose own contracts say *"updated by agents at session end"*: | File | Change | |---|---| | `bot_directives/debt.a2ml` | Carry-forward follow-ups as Phase-0 input: **should** — Coq binop parity, Lean array typing (Coq's is a ready template), `cap_subsumes_trans`; **could** — Coq `preservation` clean rewrite, Lean float binops, echo-types L3 integration blueprint. | | `bot_directives/coverage.a2ml` | `docs/proofs/verification/` recorded as a visited component (PRs #79–#82). | | `bot_directives/methodology.a2ml` | `divergent-invariants`: provers are **Lean 4 + Coq** (not Idris2/Isabelle); admit/sorry stay **zero**; the `Coq.Reals` axioms are **permitted, not escape hatches** (don't let an Axiom-scanner flag them). `known-constraints`: CI-gated + toolchain-pinned (Coq is version-sensitive); Lean/Coq cover **complementary** subsets; PROOF-NEEDS #2 is **ill-posed** pending a maintainer (a)/(b) decision. | | `6a2/STATE.a2ml` | Added `type-safety-proofs` to `[frontier]`; added `proof-gates` + `last-proof-shepherd` to `[ci]`. Existing lines preserved. | Source of truth for every claim: [`docs/proofs/verification/AUDIT.md`](../blob/main/docs/proofs/verification/AUDIT.md). ## Notes for review - **Draft on purpose** — `.machine_readable/` is maintainer-curated (`gitbot-fleet`/`hypatia` are both barred from it), so this goes through human review rather than direct-to-`main`. - The only deletions are replaced **generic template-example comments** in `methodology.a2ml` (incl. the misleading "Idris2 only" stub). No real data removed. - `coverage.a2ml`'s `total/visited` summary counters were left untouched — I won't fabricate a component denominator. - Stacked on the merged #82; the net diff is the four files above. https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7 --- _Generated by [Claude Code](https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Coq formalization
docs/proofs/verification/WokeLang.vclaimed type safety but did not compile under Coq 8.18 — the same "verified-but-never-checked" hazard the Lean file had, because no CI ever ran the prover. This sorts out the rot, audits the file meticulously, fixes a latent bug, and adds the missing gate.The rot (fixed)
Exactly one breakage:
value_eq_decuseddecide equality; … apply list_eq_dec; assumption, but the recursive IH for the nestedlist valueis no longer in scope under 8.18 ("No such assumption"). Fixed with an explicit fixpoint (fix IH 1; …; apply list_eq_dec; exact IH). Everything else — including the largepreservationproof — then compiled clean.Meticulous soundness check
Print Assumptionsonprogress/preservation/type_safety: noAdmitted/admit/Axiom; they depend only onClassicalDedekindReals.sig_forall_dec+functional_extensionality, both pulled in unavoidably by modelling floats as real numbers (R) — exactly as the file header claims.cap_subsumes_reflis even axiom-free ("Closed under the global context").Latent bug fixed
cap_subsumes's catch-all wasTODO: false, so subsumption wasn't even reflexive (cap_subsumes CapProcess CapProcess = false). Fixed to fall back to decidable equality (capability_eq_dec, keptOpaque), and provedcap_subsumes_refl.cap_subsumes_transis documented as a follow-up (needs explicit per-kind analysis; the 6×6×6 automation is brittle).Durability + audit
.github/workflows/coq-proofs.yml— installs Coq 8.18 (pinnedubuntu-24.04, since the file is version-sensitive) and runscoqc WokeLang.von every push. Can't silently rot again.AUDIT.mdgains a full Coq section: rot, axiom honesty, and coverage vs the Lean file — Coq is ahead on arrays (fullT_Array+ array stepping + well-foundedprogressonexpr_size, the exact Tier-1 item still open in Lean) and behind on binops (onlyadd/eq/and). Also flags the brute-forcepreservation("Nuclear option") as a clean-rewrite follow-up..gitignorefor Coq build artifacts.Verification
https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7
Generated by Claude Code